<%@ page import="java.net.URLEncoder" %>
<%@ page import="com.alibaba.fastjson.JSON" %><%--
  Created by IntelliJ IDEA.
  User: admin
  Date: 2020/8/16
  Time: 16:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
    String rangeString = request.getHeader("Range");//如果是video标签发起的请求就不会为null
    String contextPath = request.getServletContext().getContextPath();//获取项目名
%>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>播放</title>
    <title>i学习</title>
    <link rel="stylesheet" href="<%=contextPath%>/static/css/base.css">
    <link rel="stylesheet" href="<%=contextPath%>/static/css/index.css">
    <link rel="stylesheet" href="<%=contextPath%>/static/css/home.css">
    <link rel="stylesheet" href="<%=contextPath%>/static/css/font/iconfont.css">
    <link rel="stylesheet" href="<%=contextPath%>/static/layui/css/layui.css">
    <script src="<%=contextPath%>/static/layui/layui.js"></script>
    <script src="<%=contextPath%>/static/js/message.js"></script>
    <script src="<%=contextPath%>/static/js/jquery-1.8.3.js"></script>
    <link rel="stylesheet" href="<%=contextPath%>/static/css/Displayer.css">
    <script src="<%=contextPath%>/static/js/head.js"></script>
    <script>
        var jsp_Data = <%=JSON.toJSONString(request.getAttribute("page"))%>;
    </script>
</head>
<body>
<div id="vue_body" style="background-color: white">
    <!-- 顶部   -->
    <div class="header">
        <div class="width_1200 clearfix">
            <div class="header_right right_f">
                你好
                <div class="item uname" v-if="user"><c:if test="${sessionScope.user==null}"><a href="login.jsp">请登录</a></c:if>
                    <c:if test="${sessionScope.user!=null}"><a href="homePage.jsp">,${sessionScope.user.userName}!</a></c:if></div>
                <div class="item">欢迎来到i学习！</div>
                <div class="item login" ></div>
                <div class="item login"></div>
                <div class="item" ><a href="registration.jsp">[注册]</a></div>
                <div class="item" onclick="exitLogin()">退出</div>
                <div class="item service">客服中心</div>
            </div>

        </div>
    </div>

    <!-- 内容   -->
    <div class="logobox width_1200" style="background-color: white">
        <div class="logo left_f">
            <a href="<%=contextPath%>/index?action=getshowlist"><img src="<%=contextPath%>/static/img/logo.jpeg" width="60" height="120"></a>
        </div>
        <div class="searchbox left_f">
            <div class="input clearfix">
                <form action="<%=contextPath%>/index?action=getlistbyname" method="post">
                    <input type="text"   name="videoname" placeholder="请输入关键词">
                    <span><input style="margin-left: 66px; text-index:0px;width: 130px;font-size: 22px;border:#000000 2px solid" type="submit" value="站内搜索"></span>
                </form>
            </div>

        </div>

        <a class="myclass left_f" rel="nofollow"
           href="<%=contextPath%>/uploadServlet?action=going"> <span class="icons"></span>我要上传</a>
    </div>
    <hr style="width:100%;height:5px;margin-bottom: 3px">

</div>
<!-- 视频播放主体-->
<div class="body">

    <div>
        <!-- 播放器-->
        <video id="vdPlay" class="video" src="<%=contextPath%>/static/${video.videoAddress}"  autoplay="autoplay"
               type="video/mp4"
               width="600" height="390" preload controls>
        </video>

        <!-- 播放列表-->
        <div style="overflow:scroll;" id="listDiv" class="listDiv">
            <form>
                <ul id="listUl"style="font-size:20px;" class="listUl">
                    <c:forEach items="${requestScope.upload}" var="vd">
                        <li class="play">
                            <span style="display: none;">${vd.videoAddress}</span>
                                ${vd.videoName}
                        </li>
                    </c:forEach>
                </ul>
            </form>
        </div>
    </div>

</div>


<hr/>
<jsp:include page="include/foot.jsp"></jsp:include>

</body>
</html>
